package using.supers;
import using.association.SQL_sever;
import using.chushi_frame;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.URL;

public  class super_frame extends JFrame {
    private static final long serialVersionUID = 1L;
    SQL_sever testceshi;
    public int i=0;
    public super_frame() {
        setTitle("Main Frame");
        setBounds(200, 200, 700, 500);
        Container container = getContentPane();
        JPanel panel1 = new JPanel();
        panel1.setBorder(BorderFactory.createTitledBorder("Function panel"));
        panel1.setLayout(null);
        JButton jb1 = new JButton("Student association management system");
        JButton jb2 = new JButton("Student information management");
        JButton jb3 = new JButton("Community affairs management");
        JButton jb6 = new JButton("Basic application");
        JButton jb7 = new JButton("Password management");
        JLabel jk1 = new JLabel();
        URL url = chushi_frame.class.getResource("use3.png");
        Icon icon = new ImageIcon(url);
        jk1.setIcon(icon);
        jk1.setHorizontalAlignment(SwingConstants.CENTER);
        jk1.setOpaque(true);
        jk1.setBounds(300,50, 350, 350);
        panel1.add(jk1);
        jb1.setBounds(50, 50, 200, 40);
        jb2.setBounds(50, 100, 200, 40);
        jb3.setBounds(50, 150, 200, 40);
        jb6.setBounds(50, 200, 200, 40);
        jb7.setBounds(50, 250, 200, 40);
        jb2.addActionListener(e -> menbers_Manage.tan());
        jb3.addActionListener(e -> Community_Manage.tan());
        jb6.addActionListener(e -> apply.tan());
        jb7.addActionListener(new ActionListener() {@Override
            public void actionPerformed(ActionEvent e) {
                password_manage.tan();
                setVisible(false); }});
        container.add(panel1);panel1.add(jb1);panel1.add(jb2);panel1.add(jb3);panel1.add(jb6);panel1.add(jb7);
        //panel1.add(jl1);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setVisible(true); }
    public static void tan() {
        super_frame manageMainFrame = new super_frame();
        manageMainFrame.setVisible(true); }}

